3.8 [Libraries] Sections
The section [Libraries]
sections are optional in EDK II DSC files, although
if any EDK component is specified in the [Components]
section, then the EDK
II DSC file must contain this section. EDK components can not use EDK II
Library Instances.
Summary
Defines the [Libraries]
section tag which lists the libraries that are linked
against
EDK I components. Entries may appear in any order. Entries for EDK are a list
of INF files, with a path that is relative to the $(EFI_SOURCE)
,
$(EDK_SOURCE)
or $(ECP_SOURCE)
directories (or a MACRO definition).
One or more !include
statements may be used within the libraries sections. If
used, the file included must be a list of INF files and their paths relative to
the $(EFI_SOURCE)
, $(EDK_SOURCE)
or $(ECP_SOURCE)
directories.
Prototype
<Libraries> ::= "[Libraries" [<attribs>] "]" <EOL> <LibStatements>*
<LibStatements> ::= {<MacroDefinition>} {<IncludeStatement>}
{<Statement>}
<attribs> ::= "." <arch> [", Libraries." <arch>]*
<Statement> ::= <TS> <PathAndFilename> <EOL>
<PathAndFilename> ::= <LPATH> <Word> ".inf"
<LPATH> ::= [{"$(EDK_SOURCE)"} {<MACROVAL>} "/"] <Path>*
<Path> ::= <Word> "/"
Parameters
arch
The arch attribute must be specified in the Conf/tools_def.txt
file for the
tool chain used to build the platform in order to be valid.
Path
If only the <Path>
element is specified, the path is WORKSPACE
relative.
Example
[Libraries]
Foundation/Efi/Guid/EfiGuidLib.inf
Foundation/Framework/Guid/EdkFrameworkGuidLib.inf
Foundation/Guid/EdkGuidLib.inf
Foundation/Library/EfiCommonLib/EfiCommonLib.inf
Foundation/Cpu/Pentium/CpuIA32Lib/CpuIA32Lib.inf
Foundation/Cpu/Itanium/CpuIA64Lib/CpuIA64Lib.inf
Foundation/Library/CustomizedDecompress/CustomizedDecompress.inf
[Libraries.IA32]
DEFINE PLATFORM_DIR = $(EDK_SOURCE)/Platform
$(PLATFORM_DIR)/IntelEpg/Guid/IntelEpgGuidLib.inf
$(PLATFORM_DIR)/IntelEpg/Ppi/IntelEpgPpiLib.inf
$(PLATFORM_DIR)/Generic/Guid/GenericGuidLib.inf
$(PLATFORM_DIR)/Generic/Lib/Port80MappingLib/PlatformPort80.inf